#pragma once

#include "Arduino.h"
#include <Wire.h>
#include "Rtc_Pcf8563.h"
#include <AHTxx.h>
#include <ClosedCube_OPT3001.h>
#include "CLRC663.h"
#include "Protocentral_ADS1220.h"
#include <SPI.h>
#include <RohmMultiSensor.h>
#include <SparkFunBQ27441.h>
#include "SC7A20.h"



#define ADS1220_CS_PIN    7
#define ADS1220_DRDY_PIN  2
#define OPT3001_ADDRESS 0x44

// Pin to select the hardware, the CS pin.
#define CHIP_SELECT 4

// IRQ pin for wake-up from LPCD
#define IRQ_PIN 35


#define PGA 32                // Programmable Gain, confirm that the same as set_pga_gain
#define VREF 2.048            // Internal reference of 2.048V
#define VFSR VREF/PGA
#define FSR (((long int)1<<23)-1)


extern Rtc_Pcf8563 rtc;//0x51
extern AHTxx aht20; //0x38
extern ClosedCube_OPT3001 opt3001;//0x44
extern RPR_0521RS sensorAls;//0x38
extern BQ27441 lipo; // 0x55
extern SC7A20 accel;//地址：0x18

extern CLRC663 reader;
extern Protocentral_ADS1220 ads1220;